<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class InitUpdate53 extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('order_skus', function (Blueprint $table) {
            $table->integer('pay_order_id')->index()->nullable()->comment('真正付款的订单id');
            $table->char('pay_order_number', 30)->index()->nullable()->comment('真正付款的订单编号');
            // $table->tinyInteger('status')->comment('1为正常 2为已拉黑')->change();
        });

        Schema::table('users', function (Blueprint $table) {
            $table->integer('direct_invitees_count')->index()->default(0)->comment('直接下级用户数');
            $table->integer('indirect_invitees_count')->index()->default(0)->comment('间接下级用户数');
            // $table->tinyInteger('status')->comment('1为正常 2为已拉黑')->change();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
